<#include "admin/common/include/html_head.html"> <#include
"admin/common/include/sysparam.html"> <#include
"admin/common/include/pagination.html">
<div class="portlet box">
	<div class="portlet-title">
		<div class="caption">
			<i class="icon-comments"></i>可选择资源
		</div>
	</div>
	<div class="portlet-body">
		<div class="row-fluid">
			<form id="unbindSearchForm">
				<input type="hidden" id="categoryId" name="categoryId" value="${categoryId}" />
				<div class="span6">
					<div class="dataTables_filter" id="sample_1_filter">
						<label>标题: <input type="text" aria-controls="sample_1"
							value="${resourceName}" class="span1 m-wrap medium"
							name="resourceName" id="resourceName"></label>
					</div>

				</div>
			</form>
			<div class="span6">
				<button id="unbindreslist_query_btn" class="btn blue">
					<i class="icon-search"></i>&nbsp;&nbsp;查询
				</button>
			</div>
			<br>
		</div>
		<form action="${_contextPath}/Admin-Res-show.action" id="QueryForm">
			<table class="table table-striped table-bordered table-hover"
				id="unbindResTable">
				<thead>
					<tr>
						<th style="width: 8px;"><input type="checkbox"
							class="group-checkable" data-set="#unbindResTable .checkboxes" /></th>
						<th>标题</th>
						<th>简单描述</th>
						<th>是否有效</th>
					</tr>
				</thead>
				<tbody>
					<#list unbindPageBean.result as nav >
					<tr class="odd gradeX">
						<td><input type="checkbox" class="checkboxes"
							value="${nav.id}" /></td>
						<td>${nav.name}</td>
						<td>${nav.shortDesc}</td>
						<td><@translate paramCode=iseffCode
							value=(nav.iseff)?if_exists /></td>
					<tr></#list>
				</tbody>
			</table>
		</form>
		<@areaapagination searchFormId='unbindSearchForm' pBean=unbindPageBean
		areaId='unbindreslist' />
	</div>
</div>
<script>
	$(document).ready(function() {
		var categoryId= $('#categoryId').val(); 
		var unbindqueryUrl = '${contextPath}/Admin-Banner-showNotRelResourceByCategory.action'; 
		//初始化table
		tableAction.initTable('unbindResTable');
		//未绑定区域查询按钮事件
		$('#unbindreslist_query_btn').bind('click', function() {  
			 mainFrame.addArea(unbindqueryUrl, 'unbindreslist', 'unbindSearchForm');
		});
	});
</script>